﻿using ProjectA.Core;

namespace ProjectA.Application.System.Services
{
    public class EntityAService : IScoped, IEntityAService
    {
        private readonly IRepository<EntityA, ADbContextLocator> _repository;
        public EntityAService(IRepository<EntityA, ADbContextLocator> repository)
        {
            _repository = repository;
        }
        public async Task<int> Insert(string xx)
        {
            EntityA ee = new() { AProperty = xx };
            var res = await _repository.InsertNowAsync(ee);
            return res.Entity.Id;
        }
    }
}
